import axios from 'axios'

const state ={
  cinamedetail:{
    cinemaId:'',
    name:'',
    address:'',
    description:'',
    tel:'',
    pic:'',type:Object
  }
}
/*const actions ={

  getciname({commit}){
    axios.get('/api/cinemadetail.json')

      .then((resp)=>{
      /!*  console.log(resp);*!/

        const cinema = resp.data
        console.log("影院：",cinema);
        commit('storeCinema',cinema)

      },(error)=>{
        console.error(error);
      })
  }
}*/

const mutations ={
  storeCinema(state,cinema){
   state.cinamedetail.name = cinema.name
    state.cinamedetail.pic = cinema.pic
    state.cinamedetail.tel = cinema.tel
    //console.log(state.movieList);
  }
}

const getters ={
  backcinema(state){
    return state.cinamedetail
  },

}

export default {
  state,
  actions,
  mutations,
  getters
}
